<#include "../header.ftl">
<link href="${TEMPLATE_PATH}/css/user_base.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user_reg.css" rel="stylesheet" type="text/css" />
<script>
$(function(){
	
	$(".form_pass").validator(
	{
		stopOnError:true,
		theme:'yellow_right_effect',
		ignore:':hidden',
		valid:function(form)
		{
			$.fn.tips({type:'loading',content:'数据提交中'});
			$.ajax(
			{
				url:"/user/changeExchangePasswordJson.json",
				type:"post",
				data:$(form).serialize(),
				dataType:"json",
				success:function(data){
					var type="warn";
					if(data.result==true){type="ok";}
					$.fn.tips({type:type,content:data.msg});
					if(data.result==true)
					{
						setTimeout("location.href='?'",1000);
					}
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					$.fn.tips({type:"error",content:XMLHttpRequest.responseText});
				}
			});
		}
	});
	
	$(".c_password").blur(function(){
	var value=$(this).val();
	var box=$('#strength');
	if (value==''||value==null){
				box.removeClass().addClass('nothing').text('');
				return false;
			} else if (value.length<6){
				box.removeClass().addClass('nothing').text('密码过短');
			} else {
				var score=passwordGrade(value);
				if (score<11){
					box.removeClass().addClass('nothing').text('不安全');
				} else if (score<21){
					box.removeClass().addClass('strength normal').text('安全程度：低');
				} else if (score<31){
					box.removeClass().addClass('strength general').text('安全程度：中');
				} else if (score>30){
					box.removeClass().addClass('strength special').text('安全程度：高');
				}
			}
	});
	$("#user_menu_20").addClass("hover");
});
</script>

 <div id="position">您所在的位置：<a href="{webroot}">首页</a> > <a href="./">会员中心</a></div>
    <div class="w980 mt10 mc">
    <#include "userLeft.ftl">
      <div class="right_big">
            <div class="b">
                <div class="subject">修改交易密码</div>
                <div class="p35">
                   <form class="form_pass" method="post">
                   <ul id="reg">
                       <li><em>用户名：</em>${SESSION_USER.userName}</li>
                       <li><em>原密码：</em><input type="password" name="oldpass" class="ip w01" maxlength="16" data-rule="原密码:required;password;" /><span>默认为登录密码</span></li>
                       <li><em>新密码：</em><input type="password" name="chargePassWord" class="ip w01 c_password" maxlength="16" data-rule="新密码:required;password;" /></li>
                       <dd><div id="strength"></div></dd>
                       <li><em>确认新密码：</em><input type="password" name="repass" class="ip w01" maxlength="16" data-rule="确认新密码:required;password;match(chargePassWord)" /></li>
                       <dd><input type="submit" value="修改密码" class="bnt_blue" /> <input type="button" value="取消" onclick="location.href='javascript:history.go(-1)'" class="bnt_blue" /></dd>
                   </ul>
                   </form>
                </div>
            </div>
        </div>
    </div>
</div>
    
<#include "../footer.ftl">